UCF STIG Viewer Logo

The Kubernetes Kubelet must have the "readOnlyPort" flag disabled.


Overview

Finding ID Version Rule ID IA Controls Severity
V-242387 CNTR-K8-000330 SV-242387r918149_rule High
Description
Kubelet serves a small REST API with read access to port 10255. The read-only port for Kubernetes provides no authentication or authorization security control. Providing unrestricted access on port 10255 exposes Kubernetes pods and containers to malicious attacks or compromise. Port 10255 is deprecated and should be disabled.
STIG Date
Kubernetes Security Technical Implementation Guide 2023-08-29

Details

Check Text ( C-45662r918147_chk )
On each Control Plane and Worker Node, run the command:
ps -ef | grep kubelet

If the "--read-only-port" option exists, this is a finding.

Note the path to the config file (identified by --config).

Run the command:
grep -i readOnlyPort

If the setting "readOnlyPort" exists and is not set to "0", this is a finding.
Fix Text (F-45620r918148_fix)
On each Control Plane and Worker Node, run the command:
ps -ef | grep kubelet

Remove the "--read-only-port" option if present.

Note the path to the config file (identified by --config).

Edit the config file:
Set "readOnlyPort" to "0" or remove the setting.

Restart the kubelet service using the following command:
systemctl daemon-reload && systemctl restart kubelet